﻿using FluentValidation;
using Nop.Admin.Models.ShareBuy;
using Nop.Services.Localization;

namespace Nop.Admin.Validators.ShareBuy
{
    public class ShareBuyValidator : AbstractValidator<ShareBuyModel>
    {
        public ShareBuyValidator (ILocalizationService localizationService)
        {
            RuleFor(x => x.Title)
                .NotNull()
                .WithMessage(localizationService.GetResource("Title is required"));

            RuleFor(x => x.Description)
                .NotNull()
                .WithMessage(localizationService.GetResource("Description is required"));

        }
    }
}